<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
        canvas{
            border: 1px solid red;
        }
    </style>
</head>
<body>
    <canvas width="600" height="600" id="can">您的浏览器不支持画布</canvas>
<script type="text/javascript">
    var can=document.getElementById("can");
    //用画笔来作画
    var pen=can.getContext("2d");
    //画一个十字架
    pen.moveTo(20,120);
    pen.lineTo(120,120);
    pen.moveTo(70,60);
    pen.lineTo(70,180);
    //画一个x
    pen.moveTo(200,70);
    pen.lineTo(300,150);
    pen.moveTo(200,150);
    pen.lineTo(300,70);
    //画一个对号
    pen.moveTo(100,300);
    pen.lineTo(150,350);
    pen.moveTo(150,350);
    pen.lineTo(300,200);
    pen.stroke();
</script>
</body>
</html>